Integrand size = 29, antiderivative size = 176 \[ \int \frac {(f+g x)^2}{(d+e x) \sqrt {a+b x+c x^2}} \, dx=\frac {g^2 \sqrt {a+b x+c x^2}}{c e}+\frac {g (4 c e f-2 c d g-b e g) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{2 c^{3/2} e^2}+\frac {(e f-d g)^2 \text {arctanh}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e^2 \sqrt {c d^2-b d e+a e^2}} \]
1/2*g*(-b*e*g-2*c*d*g+4*c*e*f)*arctanh(1/2*(2*c*x+b)/c^(1/2)/(c*x^2+b*x+a) ^(1/2))/c^(3/2)/e^2+(-d*g+e*f)^2*arctanh(1/2*(b*d-2*a*e+(-b*e+2*c*d)*x)/(a *e^2-b*d*e+c*d^2)^(1/2)/(c*x^2+b*x+a)^(1/2))/e^2/(a*e^2-b*d*e+c*d^2)^(1/2) +g^2*(c*x^2+b*x+a)^(1/2)/c/e
Time = 0.70 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.05 \[ \int \frac {(f+g x)^2}{(d+e x) \sqrt {a+b x+c x^2}} \, dx=\frac {\frac {2 e g^2 \sqrt {a+x (b+c x)}}{c}+\frac {4 \sqrt {-c d^2+b d e-a e^2} (e f-d g)^2 \arctan \left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+x (b+c x)}}{\sqrt {-c d^2+e (b d-a e)}}\right )}{c d^2+e (-b d+a e)}-\frac {g (-4 c e f+2 c d g+b e g) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+x (b+c x)}}\right )}{c^{3/2}}}{2 e^2} \]
((2*e*g^2*Sqrt[a + x*(b + c*x)])/c + (4*Sqrt[-(c*d^2) + b*d*e - a*e^2]*(e* f - d*g)^2*ArcTan[(Sqrt[c]*(d + e*x) - e*Sqrt[a + x*(b + c*x)])/Sqrt[-(c*d ^2) + e*(b*d - a*e)]])/(c*d^2 + e*(-(b*d) + a*e)) - (g*(-4*c*e*f + 2*c*d*g + b*e*g)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + x*(b + c*x)])])/c^(3/2)) /(2*e^2)
Time = 0.41 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.06, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {1267, 27, 1269, 1092, 219, 1154, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(f+g x)^2}{(d+e x) \sqrt {a+b x+c x^2}} \, dx\) |
\(\Big \downarrow \) 1267 |
\(\displaystyle \frac {\int \frac {e \left (2 c e f^2-b d g^2+g (4 c e f-2 c d g-b e g) x\right )}{2 (d+e x) \sqrt {c x^2+b x+a}}dx}{c e^2}+\frac {g^2 \sqrt {a+b x+c x^2}}{c e}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {2 c e f^2-b d g^2+g (4 c e f-2 c d g-b e g) x}{(d+e x) \sqrt {c x^2+b x+a}}dx}{2 c e}+\frac {g^2 \sqrt {a+b x+c x^2}}{c e}\) |
\(\Big \downarrow \) 1269 |
\(\displaystyle \frac {\frac {2 c (e f-d g)^2 \int \frac {1}{(d+e x) \sqrt {c x^2+b x+a}}dx}{e}+\frac {g (-b e g-2 c d g+4 c e f) \int \frac {1}{\sqrt {c x^2+b x+a}}dx}{e}}{2 c e}+\frac {g^2 \sqrt {a+b x+c x^2}}{c e}\) |
\(\Big \downarrow \) 1092 |
\(\displaystyle \frac {\frac {2 c (e f-d g)^2 \int \frac {1}{(d+e x) \sqrt {c x^2+b x+a}}dx}{e}+\frac {2 g (-b e g-2 c d g+4 c e f) \int \frac {1}{4 c-\frac {(b+2 c x)^2}{c x^2+b x+a}}d\frac {b+2 c x}{\sqrt {c x^2+b x+a}}}{e}}{2 c e}+\frac {g^2 \sqrt {a+b x+c x^2}}{c e}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {2 c (e f-d g)^2 \int \frac {1}{(d+e x) \sqrt {c x^2+b x+a}}dx}{e}+\frac {g \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) (-b e g-2 c d g+4 c e f)}{\sqrt {c} e}}{2 c e}+\frac {g^2 \sqrt {a+b x+c x^2}}{c e}\) |
\(\Big \downarrow \) 1154 |
\(\displaystyle \frac {\frac {g \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) (-b e g-2 c d g+4 c e f)}{\sqrt {c} e}-\frac {4 c (e f-d g)^2 \int \frac {1}{4 \left (c d^2-b e d+a e^2\right )-\frac {(b d-2 a e+(2 c d-b e) x)^2}{c x^2+b x+a}}d\left (-\frac {b d-2 a e+(2 c d-b e) x}{\sqrt {c x^2+b x+a}}\right )}{e}}{2 c e}+\frac {g^2 \sqrt {a+b x+c x^2}}{c e}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {2 c (e f-d g)^2 \text {arctanh}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{e \sqrt {a e^2-b d e+c d^2}}+\frac {g \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) (-b e g-2 c d g+4 c e f)}{\sqrt {c} e}}{2 c e}+\frac {g^2 \sqrt {a+b x+c x^2}}{c e}\) |
(g^2*Sqrt[a + b*x + c*x^2])/(c*e) + ((g*(4*c*e*f - 2*c*d*g - b*e*g)*ArcTan h[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(Sqrt[c]*e) + (2*c*(e*f - d*g)^2*ArcTanh[(b*d - 2*a*e + (2*c*d - b*e)*x)/(2*Sqrt[c*d^2 - b*d*e + a *e^2]*Sqrt[a + b*x + c*x^2])])/(e*Sqrt[c*d^2 - b*d*e + a*e^2]))/(2*c*e)
3.9.72.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2 Subst[I nt[1/(4*c - x^2), x], x, (b + 2*c*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a , b, c}, x]
Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Sym bol] :> Simp[-2 Subst[Int[1/(4*c*d^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, ( 2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c , d, e}, x]
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_ ) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[g^n*(d + e*x)^(m + n - 1)*((a + b *x + c*x^2)^(p + 1)/(c*e^(n - 1)*(m + n + 2*p + 1))), x] + Simp[1/(c*e^n*(m + n + 2*p + 1)) Int[(d + e*x)^m*(a + b*x + c*x^2)^p*ExpandToSum[c*e^n*(m + n + 2*p + 1)*(f + g*x)^n - c*g^n*(m + n + 2*p + 1)*(d + e*x)^n - g^n*(d + e*x)^(n - 2)*(b*d*e*(p + 1) + a*e^2*(m + n - 1) - c*d^2*(m + n + 2*p + 1) - e*(2*c*d - b*e)*(m + n + p)*x), x], x], x] /; FreeQ[{a, b, c, d, e, f, g , m, p}, x] && IGtQ[n, 1] && IntegerQ[m] && NeQ[m + n + 2*p + 1, 0]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c _.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g/e Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Simp[(e*f - d*g)/e Int[(d + e*x)^m*(a + b*x + c*x^2)^ p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && !IGtQ[m, 0]
Time = 0.80 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.47
method | result | size |
risch | \(\frac {g^{2} \sqrt {c \,x^{2}+b x +a}}{c e}-\frac {\frac {g \left (b e g +2 c d g -4 c e f \right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{e \sqrt {c}}+\frac {2 \left (d^{2} g^{2}-2 d e f g +e^{2} f^{2}\right ) c \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}}{2 e c}\) | \(259\) |
default | \(-\frac {g \left (\frac {d g \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}}-\frac {2 e f \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}}-e g \left (\frac {\sqrt {c \,x^{2}+b x +a}}{c}-\frac {b \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}\right )\right )}{e^{2}}-\frac {\left (d^{2} g^{2}-2 d e f g +e^{2} f^{2}\right ) \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{3} \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}\) | \(301\) |
g^2*(c*x^2+b*x+a)^(1/2)/c/e-1/2/e/c*(g*(b*e*g+2*c*d*g-4*c*e*f)/e*ln((1/2*b +c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))/c^(1/2)+2*(d^2*g^2-2*d*e*f*g+e^2*f^2)*c /e^2/((a*e^2-b*d*e+c*d^2)/e^2)^(1/2)*ln((2*(a*e^2-b*d*e+c*d^2)/e^2+(b*e-2* c*d)/e*(x+d/e)+2*((a*e^2-b*d*e+c*d^2)/e^2)^(1/2)*((x+d/e)^2*c+(b*e-2*c*d)/ e*(x+d/e)+(a*e^2-b*d*e+c*d^2)/e^2)^(1/2))/(x+d/e)))
Timed out. \[ \int \frac {(f+g x)^2}{(d+e x) \sqrt {a+b x+c x^2}} \, dx=\text {Timed out} \]
\[ \int \frac {(f+g x)^2}{(d+e x) \sqrt {a+b x+c x^2}} \, dx=\int \frac {\left (f + g x\right )^{2}}{\left (d + e x\right ) \sqrt {a + b x + c x^{2}}}\, dx \]
Exception generated. \[ \int \frac {(f+g x)^2}{(d+e x) \sqrt {a+b x+c x^2}} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume((b/e-(2*c*d)/e^2)^2>0)', see `as sume?` for
Exception generated. \[ \int \frac {(f+g x)^2}{(d+e x) \sqrt {a+b x+c x^2}} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument Type
Timed out. \[ \int \frac {(f+g x)^2}{(d+e x) \sqrt {a+b x+c x^2}} \, dx=\int \frac {{\left (f+g\,x\right )}^2}{\left (d+e\,x\right )\,\sqrt {c\,x^2+b\,x+a}} \,d x \]